home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / March 96 / Re Unused stuff in ODF?? < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.8 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Unused stuff in ODF??
  2. Sent:        3/29/96 8:22 AM
  3. Received:    3/29/96 8:31 AM
  4. From:        lamiraux@apple.com
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >Are there classes which won't be in the final version?? Specifically,
  9. >FW_Pattern seems to be completely superseded by FW_Style.
  10. >
  11. >Additionally, why are most of the classes "duplex", IE there is an
  12. >FW_PStyle and and FW_CStyleRep. There is an FW_Pink and an FW_Cink, with
  13. >only the "FW_C..." classes having much functionality.
  14. >
  15. >THanx.
  16. >
  17.  
  18. FW_PPattern and FW_PStyle are very different. FW_PPattern represent a 
  19. pattern (Black and white or Color) like in Quickdraw. FW_PStyle has a 
  20. pensize, a line style (dashed, dotted ...) and a pattern. A shape object 
  21. (rectangle, oval) has a reference to an ink (FW_PInk) a style (FW_PStyle) 
  22. and a font (FW_PFont) for text object.
  23.  
  24.  
  25. FW_PXXXXX and FW_CXXXXXRep implement what is called smart pointers. You 
  26. never have to deal with FW_CXXXXXRep. FW_PXXXX keeps tracks of the number 
  27. of references on a FW_CXXXXXRep so unreferenced FW_CXXXXXRep are 
  28. automatically deleted. FW_PXXXXX are almost always allocated on the 
  29. stack. This allows you to not having to deal with memory issues and also 
  30. allows you to share FW_PXXXXX. Two shapes for example can point to the 
  31. same FW_PInk. Changing the foreground color in the ink will change it in 
  32. both shapes.
  33.  
  34. "Smart pointers" is a very common C++ technique. Numerous books have been 
  35. dealing with this subject. Check "Advanced C++" by Coplien. 
  36.  
  37.  
  38. .......................................................................
  39.  Henri Lamiraux                                      lamiraux@apple.com
  40.  Apple Computer, Inc.                 OpenDoc(tm) Development Framework
  41. .......................................................................
  42.  
  43.  
  44.